<template>
  <div class="route-detail-wrapper">
    <div class="top">
      <div class="top-left">
        <div class="top-left-item">
          <span class="label">人员名称:</span>
          <span class="value">{{ personDetail.name }}</span>
        </div>
        <div class="top-left-item">
          <span class="label">联系方式:</span>
          <span class="value">{{ personDetail.name }}</span>
        </div>
        <div class="top-left-item">
          <span class="label">所属园区:</span>
          <span class="value">{{ personDetail.name }}</span>
        </div>
        <div class="top-left-item">
          <span class="label">单位:</span>
          <span class="value">{{ personDetail.name }}</span>
        </div>
        <div class="top-left-item">
          <span class="label">职务:</span>
          <span class="value">{{ personDetail.name }}</span>
        </div>
      </div>
      <el-image
        class="top-img"
        fit="cover"
        :preview-src-list="[personDetail.fileUrl]"
        preview-teleported
        :src="personDetail.fileUrl"
      />
    </div>
    <div class="title">近10天内</div>
    <div class="list">
      <el-table class="custom-table" :data="tableData">
        <el-table-column prop="date" label="日期" />
        <el-table-column prop="name" label="最新入园时间" />
        <el-table-column prop="address" label="最新出园时间" />
        <el-table-column label="操作" width="60px">
          <template #default="scope">
            <el-button link type="primary">轨迹</el-button>
          </template>
        </el-table-column>
      </el-table>
    </div>
  </div>
</template>
<script setup>
import { onMounted, ref } from 'vue'
const personDetail = ref({})
const tableData = ref([{}, {}, {}, {}, {}, {}, {}, {}, {}, {}])
onMounted(() => {})
</script>
<style lang="scss" scoped>
.route-detail-wrapper {
  width: 420px;
  height: calc(100% - 40px);
  background-color: #ffffff;
  box-shadow: 0px 0px 10px 0px rgba(0, 0, 0, 0.1);
  border-radius: 4px;
  position: absolute;
  left: 20px;
  top: 20px;
  display: flex;
  flex-direction: column;
  box-sizing: border-box;
  padding: 20px;
  .top {
    width: 100%;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    &-left {
      &-item {
        margin-bottom: 20px;
        display: flex;
        .label {
          font-weight: 400;
          font-size: 14px;
          color: #333333;
          margin-right: 5px;
        }
        .value {
          font-weight: 400;
          font-size: 14px;
          color: #757575;
        }
      }
    }
    &-img {
      width: 100px;
      height: 150px;
    }
  }
  .title {
    width: 100%;
    padding: 0 0 5px 15px;
    font-size: 14px;
    line-height: 14px;
    font-weight: 400;
    color: #151515;
    position: relative;
    margin-bottom: 10px;
    &::before {
      content: ' ';
      position: absolute;
      width: 4px;
      height: 16px;
      background: linear-gradient(0deg, #4575ee 0%, #6297f5 100%);
      border-radius: 2px;
      top: 0px;
      left: 0px;
    }
    .el-button {
      margin-left: 10px;
    }
  }
  .list {
    width: 100%;
    height: calc(100% - 220px);
    .custom-table {
      height: 100%;
    }
  }
}
</style>
